package com.example.myapplication.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

import androidx.annotation.Nullable;

import com.example.myapplication.data.AIDLStub;

public class AIDLService extends Service {

    private AIDLStub aidlStub;

    @Override
    public void onCreate() {
        super.onCreate();
        aidlStub = new AIDLStub();
    }

    public void getData(String data) throws RemoteException {
        aidlStub.getData(data);
        System.out.println("data");
        Log.i("AIDL------------------>",data);
    }


    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return aidlStub;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }
}
